#include<iostream>
using namespace std;
typedef struct BinTreeNode
{
	int data;
	struct BinTreeNode* lchild;
	struct BinTreeNode* rchild;
}BTN;
bool Fun2(BTN* t1, BTN* t2)
{
	if (t1 == NULL) {
		return false;
	}
	if (t2 == NULL) {
		return true;
	}
	if (t1->data != t2->data) {
		return false;
	}
	return Fun2(t1->lchild, t2->rchild) && Fun2(t1->rchild, t2->rchild);
}
bool Fun1(BTN* t1, BTN* t2)
{
	bool result = false;
	if (t1 != NULL && t2 != NULL) {
		if (t1->data == t2->data) {
			Fun2(t1, t2);
		}
		if (!result) {
			return Fun1(t1->lchild, t2->lchild);
		}
		if (!result) {
			return Fun1(t1->rchild, t2->rchild);
		}
	}
}